package com.shenhua.linechart;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.view.SurfaceHolder;
import android.view.View;
import android.widget.Button;

/**
 * Created by hbh on 2017/4/10.
 */

public class TestWaveActivity extends Activity {

    private WaveChart linechart;
    private Button btn;
    SurfaceHolder holder;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_wave_test);

        linechart=(WaveChart)findViewById(R.id.linechart);
        btn=(Button) findViewById(R.id.btn);
        holder=linechart.getHolder();

//        new Handler().postDelayed(new Runnable() {
//            @Override
//            public void run() {
//                linechart.init(holder);
//            }
//        },1000);

//        btn.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                linechart.init(holder);
//            }
//        });

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();

        linechart.close();
    }
}
